export default function getDateInfo(dateStr) {
  const today = new Date();
  const tomorrow = new Date(today);
  tomorrow.setDate(today.getDate() + 1); // 设置为明天
 
  const date = new Date(dateStr);
  const dateDay = date.getDate();
  const dateMonth = date.getMonth();
  const dateYear = date.getFullYear();
 
  const todayDay = today.getDate();
  const todayMonth = today.getMonth();
  const todayYear = today.getFullYear();
 
  const tomorrowDay = tomorrow.getDate();
  const tomorrowMonth = tomorrow.getMonth();
  const tomorrowYear = tomorrow.getFullYear();
  
  const dateArr = new Array("日", "一", "二", "三", "四", "五", "六");
  const week = date.getDay(); // 0 表示周日，1 到 6 表示周一到周六
 
  const dateInfo = {
    isToday: dateDay === todayDay && dateMonth === todayMonth && dateYear === todayYear,
    isTomorrow: dateDay === tomorrowDay && dateMonth === tomorrowMonth && dateYear === tomorrowYear,
    dayOfWeek:  dateArr[week]
  };
 
  return dateInfo;
}